home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_100 / 193_01 / backup.txt < prev    next >
Text File  |  1985-11-13  |  5KB  |  104 lines

  1.                         BACKUP
  2.                         ------
  3.  
  4.          The concept behind "backup" is to use byte "t3" of the
  5.          file name which, for those unfamiliar with the CP/M
  6.          organisation is the third character in the "type"
  7.          extension to the name.   For example, the name -
  8.  
  9.                    backup.c
  10.  
  11.          consists of -
  12.  
  13.                    name      ==>  "backup"
  14.          and       type      ==>  "c" which, as you have already
  15.          
  16.          noticed doesn't contain 3 characters.   But not to worry,
  17.          CP/M makes PROVISION for three characters which, if not
  18.          actually used, are converted to spaces (ASCII 32, decimal).
  19.  
  20.          So, whether or not you choose to specify 3 characters in the
  21.          extension, you always have 3 available to you and so we can
  22.          set bit 7 in t3 (or un-set it) as we need to in the backup
  23.          programme.   In fact this is what the programme does after
  24.          it has archived (copied to the archive disk) the file(s)
  25.          which haven't been previously archived by BACKUP.
  26.  
  27.          i.e. it then sets bit 7 of t3 to let BACKUP know that you
  28.          have already archived this file.
  29.  
  30.          When you alter the file again, most text editors un-set the
  31.          attribute bits in t1, t2 and t3 so that BACKUP will then
  32.          regard the altered file as one which was not previously
  33.          archived (which is true) and will archive it for you in the
  34.          normal course of events.
  35.  
  36.          If YOUR text editor doesn't do this then use the companion
  37.          programme SETATR ( set attributes) to make the edited file
  38.          copyable, and BACKUP can then archive it for you.
  39.  
  40.          A couple of special point to be aware of when using BACKUP
  41.          are -
  42.  
  43.          A.   It can be used to back-up a hard disk but, the first
  44.               time you use it you should have previously used
  45.               SETATR to make sure your normal "COM" files are not
  46.               needlessly backed-up to the floppy disk.   You may
  47.               also wish to disqualify all those other files which
  48.               you already have 3 copies of, on floppy disk, and
  49.               only archive the more recent work which you never
  50.               seem to have the time to archive, usually.
  51.  
  52.          B.   Don't worry if you find you have filled the archive
  53.               disk before archiving all the files on the master
  54.               disk.   Just put another (clean, formatted) disk in
  55.               the target drive, do a CONTROL-C, and re-run BACKUP.
  56.  
  57.               It won't re-copy the files it copied to the first disk
  58.               but will start again from the file it wouldn't copy to
  59.               the disk which became full, and copy the rest of the
  60.               files to the new disk.
  61.  
  62.          C.   The normal usage of BACKUP is -
  63.  
  64.                         backup  d1  d2  <RETURN>
  65.  
  66.               where "d1" is the drive being copied and "d2" is the
  67.               drive which contains the archive disk.   Either lower
  68.               case or upper case is OK but note particularly that
  69.               "d1:" is wrong.   Just enter the letter without the
  70.               colon as BACKUP only expects a single character.
  71.  
  72.               If you don't remember this, or the order in which the
  73.               transfer is made -
  74.  
  75.                         FROM  d1  TO  d2
  76.  
  77.               then just enter backup  <RETURN> and respond to the
  78.               prompts which appear on the screen.
  79.  
  80.          D.   I didn't put in any special error handling functions
  81.               to deal with the problem you will encounter when you
  82.               try to back up a file which has been made R/O on the
  83.               archive disk.   It was easy enough to remove the R/O
  84.               status with the "set_bit" routine, and then erase the
  85.               file on the archive disk before making the new copy
  86.               with BACKUP.
  87.  
  88.               So beware, BACKUP will copy your files NO MATTER WHAT!
  89.  
  90.  
  91.          That's about all there is to it.   BACKUP is a simple
  92.          programme (which does a complex job) and I've kept it that
  93.          way as I've seen a number of similar programmes in Public
  94.          Domain software, but NONE of them worked when I tried them
  95.          on my system!   Backup SHOULD work on any CP/M 2.2 system
  96.          but if you have any problems send your bug reports to -
  97.  
  98.                              Phil Cogar,
  99.                              P.O. Box 364,
  100.                              Narrabeen,
  101.                              N.S.W.   AUSTRALIA   2101
  102.                              -------------------------
  103. isk
  104.